-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x509.certificate_managed: always call file.managed even when cert contents haven't changed #56788
Conversation
First of all I must notice that I'm running Salt 2019.2.3 (Fluorine) on Debian 9, Python 2.7 but this PR is based on
I run few tests:
but after execution all changes are displayed correctly
May be it's possible to show |
@glynnforrest what OS, Salt and Python versions you are running? I'm trying to upgrade to Deb 10, and therefore forced to switch to Py3 and it looks like I'm faced with #56556 |
@hatifnatt this got merged into master, I tested the copy of x509 module and state and sadly still have the same behavior as in #56556 |
@sjorge this is not merged to master for now, #52935 - is merged. But both of these PRs are not supposed to fix issue from #56556. |
This ensures that the certificate file has the intended file properties, even if the certificate contents themselves don't need to change. See saltstack#52935 (comment)
6513473
to
d793e4d
Compare
Thanks @hatifnatt for trying it out. I've added Note that the diff in test mode won't include the new certificate in it, for security and performance reasons. See my comment here: https://github.com/saltstack/salt/pull/56788/files#diff-5499a295a50d60a761c34f4080e4014bR647 @garethgreenaway @dwoz this is ready now. |
Should it include the old one though? |
Not 100% sure what you're asking here. If you mean the diff in the |
Ping @sagetherage, any chance you could get someone to look at this? |
This is getting merged as part of #57688 (cherry-picked) |
Please state if closing was the wrong move, I can re-open. |
What does this PR do?
Fixes a bug I introduced when rewriting
x509.certificate.managed
.The state now always calls
file.managed
, even if the certificate contents don't need to change. This allows the user to change the user / group / mode of an existing certificate.Both file and certificate changes are properly shown in the state output:
Ping @Ch3LL and @waynew, since you worked on #52935.
What issues does this PR fix or reference?
See #52935 (comment)
Merge requirements satisfied?
Commits signed with GPG?
Yes